home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_splashparticlebig.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  73 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_splashparticlebig.cog
  4. #
  5. # gimme a particle with that splash there, Guido...
  6. #
  7. # [TRM] && [PAZ] && [GGJ]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. #========================================================================================
  11.  
  12. symbols
  13.     
  14.     message         startup
  15.     message            sighted
  16.     message            pulse         
  17.  
  18.     thing            spriteThing     local
  19.     thing            player          local
  20.     
  21.     template        splashA=spritlemist        local
  22.     
  23.     flex            pulsetime       local
  24.     
  25. end
  26.  
  27. #========================================================================================
  28.  
  29. code
  30.  
  31. startup:
  32.  
  33.     player = GetLocalPlayerThing();
  34.     return;  
  35.  
  36. #========================================================================================
  37.  
  38. sighted:
  39.  
  40.     Print("sighted: creating splash");
  41.     spriteThing = GetSenderRef();
  42.  
  43.     SetThingPulse(spriteThing, 2.0);
  44.     
  45.     return;
  46.         
  47. #========================================================================================
  48.  
  49. pulse:
  50.  
  51.     spriteThing = GetSenderRef();
  52.  
  53.     CreateThing(splashA, spriteThing);
  54.     
  55.     if(HasLOS(player, spriteThing) == 1)
  56.     {
  57.         pulseTime = RandBetween(1, 2);
  58.         SetThingPulse(spriteThing, pulsetime);
  59.     }
  60.         
  61.     else
  62.     {
  63.         Print("splash off");
  64.         SetThingPulse(spriteThing, 0);
  65.     }
  66.         
  67.     return;
  68.     
  69. #========================================================================================
  70.     
  71. end
  72.  
  73.